import numpy as np
import pandas as pd


def read_data(data_file_path):
    data = pd.read_csv(data_file_path).values
    x = data[:, 0:2]
    y = data[:, 2:]
    x, y = data_transform(x, y)
    return x, y


def data_transform(x, y):
    x = input_maxmin_normalization(x)
    # y = y*1000
    return x, y


def input_maxmin_normalization(x):
    x_max = np.max(x, axis=0)
    x_min = np.min(x, axis=0)
    x = (x - x_min) / (x_max - x_min)
    return x

